<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="box">8888888888</div>
    <script>
      //   let res = eval("1+1");
      //   console.log(res);
      //   let str = prompt("请输入代码");
      //   console.log(eval(str));
      //   document.getElementById("box").style.background = "red";
      //   let student = [
      //     {
      //       name: "张三",
      //       age: 19,
      //       sex: "男",
      //     },
      //     {
      //       name: "李四",
      //       age: 17,
      //       sex: "女",
      //     },
      //     {
      //       name: "Tom",
      //       age: 16,
      //       sex: "男",
      //     },
      //   ];
      //   let res = student.find((item, index) => {
      //     return item.name.toLowerCase() == "Tom".toLowerCase();
      //   });
      //   console.log(res);

      var arr = [7, 3, 4, 5, 6, 2, 1];
      for (var i = 0; i < arr.length; i++) {
        for (var j = i + 1; j < arr.length; j++) {
          if (arr[i] > arr[j]) {
            var temp = arr[i]; //temp = 7
            arr[i] = arr[j]; //arr[i] = 3
            arr[j] = temp; //arr[j] = 7
          }
        }
      }
    </script>
  </body>
</html>
